package com.hh.vietnameseproject.logic.network


import com.hh.vietnameseproject.logic.interceptor.HeaderInterceptor
import okhttp3.OkHttpClient
import retrofit2.Retrofit


object ServiceCreator {
    private const val BASE_URL = "http://124.222.92.33/"
    private val retrofit = Retrofit.Builder().baseUrl(BASE_URL)
        .client(OkHttpClient.Builder().addInterceptor(HeaderInterceptor()).build())
        .build()
    fun <T> create(serviceClass:Class<T>):T = retrofit.create(serviceClass)
    inline fun <reified T> create():T = create(T::class.java)
}